package com.lynn.baseproject.vm

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.lynn.baseproject.entity.BiYingEntity
import com.lynn.baseproject.model.MainModel
import com.lynn.lib_base.http.BaseObserver
import com.lynn.lib_base.http.HttpUtils
import com.lynn.lib_base.ui.BaseViewModel

/**
 * @description:
 * @author: bailing
 * @datetime: 2025/5/28 15:18
 **/
class MainViewModel: BaseViewModel() {

    var liveData = MutableLiveData<BiYingEntity>()

    fun getBiYing(){
        val result = MainModel().getBiYing(HttpUtils.applySchedulers(object : BaseObserver<BiYingEntity>() {
            override fun onSuccess(t: BiYingEntity) {
                liveData.value = t
            }

            override fun onFailure(e: Throwable) {

            }

        }))
    }

}